home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 September
/
1986-09.d64
/
wizard demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
113 lines
10 if te=0 then te=49152:load"window wizard",8,1
20 sys te:print"[147]";:!hue(6,6,14):fori=0to23
30 print" window wizard window wizard":next
40 print" window wizard window wizard[159]";:!restore
50 !def(1,0,1,0,32,50,50):!dim(4,20,19,15)
60 a$="welcome to the wonderful world of window wizard"+chr$(13)+chr$(13)
70 a$=a$+"[155]prepare to be bewildered and amazed by the power of your c-64...[159]"
80 a$=a$+chr$(13)+chr$(13)+" press the space bar to continue "
90 !open,a$
100 gosub1110:!dim(8,3,30,10)
110 a$="with wizard, you can print any message (up to 255 characters) in a "
120 a$=a$+"magic window. and wait til you see what can be done with the window"
130 !open,a$
140 gosub1110:!def(1,0,10,102,32):!dim(14,12,25,9)
150 a$="[158]you can, for example, change either the color of the window or the"
160 a$=a$+" character used for the border of the window.[159]":!open,a$
170 gosub1110:!def(0,0,1,0,32,35,35):!dim(1,18,14,14)
180 a$="as you can hear, the printing can be done with or without sound."
190 !open,a$
200 gosub1110:!def(1,0,1,0,32,1,1):!dim(10,5,25,6)
210 a$="and you can vary the speed both for the window and the printing."
220 !open,a$
230 gosub1110:!def(1,1,1,0,32,25,25):!dim(2,2,24,10)
240 a$="notice the three dimensional effect of this window? that's just one "
250 a$=a$+"of the many effects at your command.":!open,a$
260 gosub1110:a$="and you can reuse a window whenever you wish...":!again,a$
270 gosub1110:!def(1,1,1,160,160,25,25):!dim(6,20,18,12)
280 a$="you can change the interior of the window, too.[146][159]":!open,a$
290 gosub1110:!def(1,0,0,0,32,5,50):!dim(0,0,40,25)
300 a$=chr$(13)+"and for the real kicker --"+chr$(13)+chr$(13)
310 a$=a$+"[159] very slowly now, press the space bar eight times "
320 a$=a$+"to step [155]backwards[159] through the windows.":!open,a$
330 for i=1 to 8
340 gosub1110
350 !close:nexti
360 !dim(6,15,22,12):!def(1,1,1,0,32,35,35)
370 a$="of course, there are many more commands available through window "
380 a$=a$+"wizard. for example, press the space bar to '!save' "
390 a$=a$+"the screen...":!open,a$
400 gosub1110:!save:a$="press it again to clear the screen...":!again,a$
410 gosub1110:print"[147]"
420 a$="and now press it once more to '!load' the screen we saved before...
430 !again,a$
440 [141]1110:![147]:[129] i[178]1[164]500:[130]
450 a$[178]"and we're right back where we started from..."
460 !again,a$:[129]i[178]1[164]2000:[130]:![160]
470 ![140]:![150](0,1,1,0,32,10,20):![134](4,4,22,12)
480 a$[178]"what are some of the other commands available?":![159],a$
490 [129]i[178]1[164]2000:[130]
500 a$[178]"well, you can use wizard's '!tone' command for you own purposes."
510 a$[178]a$[170][199](13)[170]"press the space bar to hear it (press listreturnopen to move on)
520 !again,a$
530 getk$:ifk$=""then530
540 ifk$=chr$(13) then570
550 ifk$<>chr$(32)then530
560 !tone,80:goto530
570 a$="and you have total scrolling of any area of the screen, as well."
580 a$=a$+"press the numbers 1 to 4 to see what i mean (or press [155]return[159] to"
590 a$=a$+" move on).":!again,a$
600 getk$:ifk$=""then600
610 ifk$=chr$(13)then660
620 ifk$<"1"ork$>"4"then600
630 k=val(k$)
640 t=12:if k/2=int(k/2) then t=22
650 fori=1tot:!scroll,k,1:forj=1to50:next:next:goto570
660 a$="[159]and the '!erase' command will erase any row you direct."+chr$(13)
670 a$=a$+"press a number key and we'll erase that row..."
680 a$=a$+" (or press [155]return[159] to move on)
690 !again,a$
700 k$[178]"":[161]k$:[139]k$[178]""[167]700
710 [139]k$[178][199](13)[167]740
720 [139]k$[179]"0"[176]k$[177]"9"[167]700
730 l[178][197](k$):!erase,l:[137]700
740 ![160]:![134](12,4,30,7)
750 a$[178]"and now we need to move our window down here to show you the next"
760 a$[178]a$[170]" wizard command...":![159],a$:[129]i[178]1[164]1500:[130]
770 a$[178]"let's clear the top of the screen with our '!erase' command..."
780 !again,a$:[129] i[178]0 [164] 11:!erase,i:[130]:[129]i[178]1[164]2000:[130]
790 a$[178]"and now we'll examine yet another command...":!again,a$
800 [129]i[178]1[164]2000:[130]:!center,3,"notice how"
810 !center,4,"these three lines are all":!center,5,"centered?"
820 a$[178]"it was done with wizard's '!center' command.":!again,a$
830 [129]i[178]1[164]3000:[130]:![160]:![140]:![134](0,1,38,5)
840 a$[178]"you may discover that wizard's '!box' command will come in handy..."
850 ![159],a$:[129]i[178]1[164]1500:[130]:![150](0,0,0,0,32,20,15):![134](7,1,18,10):!box
860 ![134](7,21,18,10):!box:![134](18,1,12,6):!box:![134](18,14,12,6):!box
870 ![134](18,27,12,6):!box:[129]i[178]1[164]2000:[130]:![160]:![140]
880 ![150](1,1,1,0,32,35,35):![134](1,20,19,8)
890 a$[178]"and you can use the '!kinetic' command to move windows...":![159],a$
900 [129]i[178]1[164]1500:[130]:[129]i[178]1[164]12:!kinetic(3,0,0):!kinetic(4,0,0):[130]
910 a$[178]"and, using the same command, you can control the size of any of "
920 a$[178]a$[170]"your magic windows...":!again,a$:[129]i[178]1[164]1500:[130]
930 [129]i[178]1[164]12:j[178]19[170]i:k[178]8[170]i:!kinetic(1,j,k):[130]:![134](10,5,30,9)
940 a$[178]"there are also commands like '!restore', '!print@', and '!display'."
950 a$[178]a$[170][199](13)[170][199](13)[170]"but the last one we'll demonstrate "
960 a$[178]a$[170]"is the '!menu' command. it's a handy one.":![159],a$
970 [129] i[178]1[164]1500:[130]:r$[178][199](13):m$[178]" menu"[170]r$[170]r$
980 m$[178]m$[170]"1. this is an"[170]r$:m$[178]m$[170]"2. an example of"[170]r$[170]"3. a window"[170]r$
990 m$[178]m$[170]"4. generated"[170]r$[170]"5. menu":m$[178]m$[170]r$[170]"6. press a key"
1000 ![150](1,1,0,0,32,10,30):![134](5,16,22,11):!menu,m$,k$:![134](16,5,35,6)
1010 ![150](1,1,1,0,32,10,10)
1020 a$[178]"you just pressed the '"[170]k$[170]"' key."[170][199](13)
1030 [139]k$[179]"1"[176]k$[177]"6"[167]a$[178]a$[170]"that wasn't even on the menu"
1040 ![159],a$:[129]i[178]1[164]2000:[130]:![134](3,1,20,20)
1050 a$[178]"listsys 49152open acts as a toggle switch. if wizard is off, it will "
1060 a$[178]a$[170]"turn it on and if wizard is on, it will turn it off."[170]r$[170]r$
1070 a$[178]a$[170]"tapping listrestoreopen will give you a full page review of all 19 of "
1080 a$[178]a$[170]"wizard's commands"[170]r$[170]r$
1090 a$[178]a$[170]"listpress the space bar to end this demonstration.open":![159],a$
1100 [141]1110:[153]"load":[128]
1110 k$[178]"":[161]k$:[139]k$[178]""[167]1110
1120 [142]